home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / dggevx.z / dggevx
Encoding:
Text File  |  2002-10-03  |  14.6 KB  |  397 lines

  1.  
  2.  
  3.  
  4. DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))                                                          DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DGGEVX - compute for a pair of N-by-N real nonsymmetric matrices (A,B)
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      SUBROUTINE DGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
  13.                         ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO, IHI,
  14.                         LSCALE, RSCALE, ABNRM, BBNRM, RCONDE, RCONDV, WORK,
  15.                         LWORK, IWORK, BWORK, INFO )
  16.  
  17.          CHARACTER      BALANC, JOBVL, JOBVR, SENSE
  18.  
  19.          INTEGER        IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
  20.  
  21.          DOUBLE         PRECISION ABNRM, BBNRM
  22.  
  23.          LOGICAL        BWORK( * )
  24.  
  25.          INTEGER        IWORK( * )
  26.  
  27.          DOUBLE         PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), B(
  28.                         LDB, * ), BETA( * ), LSCALE( * ), RCONDE( * ), RCONDV(
  29.                         * ), RSCALE( * ), VL( LDVL, * ), VR( LDVR, * ), WORK(
  30.                         * )
  31.  
  32. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  33.      These routines are part of the SCSL Scientific Library and can be loaded
  34.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  35.      directs the linker to use the multi-processor version of the library.
  36.  
  37.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  38.      4 bytes (32 bits). Another version of SCSL is available in which integers
  39.      are 8 bytes (64 bits).  This version allows the user access to larger
  40.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  41.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  42.      only one of the two versions; 4-byte integer and 8-byte integer library
  43.      calls cannot be mixed.
  44.  
  45. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  46.      DGGEVX computes for a pair of N-by-N real nonsymmetric matrices (A,B) the
  47.      generalized eigenvalues, and optionally, the left and/or right
  48.      generalized eigenvectors.
  49.  
  50.      Optionally also, it computes a balancing transformation to improve the
  51.      conditioning of the eigenvalues and eigenvectors (ILO, IHI, LSCALE,
  52.      RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for the
  53.      eigenvalues (RCONDE), and reciprocal condition numbers for the right
  54.      eigenvectors (RCONDV).
  55.  
  56.      A generalized eigenvalue for a pair of matrices (A,B) is a scalar lambda
  57.      or a ratio alpha/beta = lambda, such that A - lambda*B is singular. It is
  58.      usually represented as the pair (alpha,beta), as there is a reasonable
  59.      interpretation for beta=0, and even for both being zero.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))                                                          DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      The right eigenvector v(j) corresponding to the eigenvalue lambda(j) of
  75.      (A,B) satisfies
  76.  
  77.                       A * v(j) = lambda(j) * B * v(j) .
  78.  
  79.      The left eigenvector u(j) corresponding to the eigenvalue lambda(j) of
  80.      (A,B) satisfies
  81.  
  82.                       u(j)**H * A  = lambda(j) * u(j)**H * B.
  83.  
  84.      where u(j)**H is the conjugate-transpose of u(j).
  85.  
  86.  
  87.  
  88. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  89.      BALANC  (input) CHARACTER*1
  90.              Specifies the balance option to be performed.  = 'N':  do not
  91.              diagonally scale or permute;
  92.              = 'P':  permute only;
  93.              = 'S':  scale only;
  94.              = 'B':  both permute and scale.  Computed reciprocal condition
  95.              numbers will be for the matrices after permuting and/or
  96.              balancing. Permuting does not change condition numbers (in exact
  97.              arithmetic), but balancing does.
  98.  
  99.      JOBVL   (input) CHARACTER*1
  100.              = 'N':  do not compute the left generalized eigenvectors;
  101.              = 'V':  compute the left generalized eigenvectors.
  102.  
  103.      JOBVR   (input) CHARACTER*1
  104.              = 'N':  do not compute the right generalized eigenvectors;
  105.              = 'V':  compute the right generalized eigenvectors.
  106.  
  107.      SENSE   (input) CHARACTER*1
  108.              Determines which reciprocal condition numbers are computed.  =
  109.              'N': none are computed;
  110.              = 'E': computed for eigenvalues only;
  111.              = 'V': computed for eigenvectors only;
  112.              = 'B': computed for eigenvalues and eigenvectors.
  113.  
  114.      N       (input) INTEGER
  115.              The order of the matrices A, B, VL, and VR.  N >= 0.
  116.  
  117.      A       (input/output) DOUBLE PRECISION array, dimension (LDA, N)
  118.              On entry, the matrix A in the pair (A,B).  On exit, A has been
  119.              overwritten. If JOBVL='V' or JOBVR='V' or both, then A contains
  120.              the first part of the real Schur form of the "balanced" versions
  121.              of the input A and B.
  122.  
  123.      LDA     (input) INTEGER
  124.              The leading dimension of A.  LDA >= max(1,N).
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))                                                          DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      B       (input/output) DOUBLE PRECISION array, dimension (LDB, N)
  141.              On entry, the matrix B in the pair (A,B).  On exit, B has been
  142.              overwritten. If JOBVL='V' or JOBVR='V' or both, then B contains
  143.              the second part of the real Schur form of the "balanced" versions
  144.              of the input A and B.
  145.  
  146.      LDB     (input) INTEGER
  147.              The leading dimension of B.  LDB >= max(1,N).
  148.  
  149.      ALPHAR  (output) DOUBLE PRECISION array, dimension (N)
  150.              ALPHAI  (output) DOUBLE PRECISION array, dimension (N) BETA
  151.              (output) DOUBLE PRECISION array, dimension (N) On exit,
  152.              (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will be the
  153.              generalized eigenvalues.  If ALPHAI(j) is zero, then the j-th
  154.              eigenvalue is real; if positive, then the j-th and (j+1)-st
  155.              eigenvalues are a complex conjugate pair, with ALPHAI(j+1)
  156.              negative.
  157.  
  158.              Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) may
  159.              easily over- or underflow, and BETA(j) may even be zero.  Thus,
  160.              the user should avoid naively computing the ratio ALPHA/BETA.
  161.              However, ALPHAR and ALPHAI will be always less than and usually
  162.              comparable with norm(A) in magnitude, and BETA always less than
  163.              and usually comparable with norm(B).
  164.  
  165.      VL      (output) DOUBLE PRECISION array, dimension (LDVL,N)
  166.              If JOBVL = 'V', the left eigenvectors u(j) are stored one after
  167.              another in the columns of VL, in the same order as their
  168.              eigenvalues. If the j-th eigenvalue is real, then u(j) = VL(:,j),
  169.              the j-th column of VL. If the j-th and (j+1)-th eigenvalues form
  170.              a complex conjugate pair, then u(j) = VL(:,j)+i*VL(:,j+1) and
  171.              u(j+1) = VL(:,j)-i*VL(:,j+1).  Each eigenvector will be scaled so
  172.              the largest component have abs(real part) + abs(imag. part) = 1.
  173.              Not referenced if JOBVL = 'N'.
  174.  
  175.      LDVL    (input) INTEGER
  176.              The leading dimension of the matrix VL. LDVL >= 1, and if JOBVL =
  177.              'V', LDVL >= N.
  178.  
  179.      VR      (output) DOUBLE PRECISION array, dimension (LDVR,N)
  180.              If JOBVR = 'V', the right eigenvectors v(j) are stored one after
  181.              another in the columns of VR, in the same order as their
  182.              eigenvalues. If the j-th eigenvalue is real, then v(j) = VR(:,j),
  183.              the j-th column of VR. If the j-th and (j+1)-th eigenvalues form
  184.              a complex conjugate pair, then v(j) = VR(:,j)+i*VR(:,j+1) and
  185.              v(j+1) = VR(:,j)-i*VR(:,j+1).  Each eigenvector will be scaled so
  186.              the largest component have abs(real part) + abs(imag. part) = 1.
  187.              Not referenced if JOBVR = 'N'.
  188.  
  189.      LDVR    (input) INTEGER
  190.              The leading dimension of the matrix VR. LDVR >= 1, and if JOBVR =
  191.              'V', LDVR >= N.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))                                                          DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))
  203.  
  204.  
  205.  
  206.              ILO,IHI (output) INTEGER ILO and IHI are integer values such that
  207.              on exit A(i,j) = 0 and B(i,j) = 0 if i > j and j = 1,...,ILO-1 or
  208.              i = IHI+1,...,N.  If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
  209.  
  210.      LSCALE  (output) DOUBLE PRECISION array, dimension (N)
  211.              Details of the permutations and scaling factors applied to the
  212.              left side of A and B.  If PL(j) is the index of the row
  213.              interchanged with row j, and DL(j) is the scaling factor applied
  214.              to row j, then LSCALE(j) = PL(j)  for j = 1,...,ILO-1 = DL(j)
  215.              for j = ILO,...,IHI = PL(j)  for j = IHI+1,...,N.  The order in
  216.              which the interchanges are made is N to IHI+1, then 1 to ILO-1.
  217.  
  218.      RSCALE  (output) DOUBLE PRECISION array, dimension (N)
  219.              Details of the permutations and scaling factors applied to the
  220.              right side of A and B.  If PR(j) is the index of the column
  221.              interchanged with column j, and DR(j) is the scaling factor
  222.              applied to column j, then RSCALE(j) = PR(j)  for j = 1,...,ILO-1
  223.              = DR(j)  for j = ILO,...,IHI = PR(j)  for j = IHI+1,...,N The
  224.              order in which the interchanges are made is N to IHI+1, then 1 to
  225.              ILO-1.
  226.  
  227.      ABNRM   (output) DOUBLE PRECISION
  228.              The one-norm of the balanced matrix A.
  229.  
  230.      BBNRM   (output) DOUBLE PRECISION
  231.              The one-norm of the balanced matrix B.
  232.  
  233.      RCONDE  (output) DOUBLE PRECISION array, dimension (N)
  234.              If SENSE = 'E' or 'B', the reciprocal condition numbers of the
  235.              selected eigenvalues, stored in consecutive elements of the
  236.              array. For a complex conjugate pair of eigenvalues two
  237.              consecutive elements of RCONDE are set to the same value.  Thus
  238.              RCONDE(j), RCONDV(j), and the j-th columns of VL and VR all
  239.              correspond to the same eigenpair (but not in general the j-th
  240.              eigenpair, unless all eigenpairs are selected).  If SENSE = 'V',
  241.              RCONDE is not referenced.
  242.  
  243.      RCONDV  (output) DOUBLE PRECISION array, dimension (N)
  244.              If SENSE = 'V' or 'B', the estimated reciprocal condition numbers
  245.              of the selected eigenvectors, stored in consecutive elements of
  246.              the array. For a complex eigenvector two consecutive elements of
  247.              RCONDV are set to the same value. If the eigenvalues cannot be
  248.              reordered to compute RCONDV(j), RCONDV(j) is set to 0; this can
  249.              only occur when the true value would be very small anyway.  If
  250.              SENSE = 'E', RCONDV is not referenced.
  251.  
  252.      WORK    (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
  253.              On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  254.  
  255.      LWORK   (input) INTEGER
  256.              The dimension of the array WORK. LWORK >= max(1,6*N).  If SENSE =
  257.              'E', LWORK >= 12*N.  If SENSE = 'V' or 'B', LWORK >=
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))                                                          DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))
  269.  
  270.  
  271.  
  272.              2*N*N+12*N+16.
  273.  
  274.              If LWORK = -1, then a workspace query is assumed; the routine
  275.              only calculates the optimal size of the WORK array, returns this
  276.              value as the first entry of the WORK array, and no error message
  277.              related to LWORK is issued by XERBLA.
  278.  
  279.      IWORK   (workspace) INTEGER array, dimension (N+6)
  280.              If SENSE = 'E', IWORK is not referenced.
  281.  
  282.      BWORK   (workspace) LOGICAL array, dimension (N)
  283.              If SENSE = 'N', BWORK is not referenced.
  284.  
  285.      INFO    (output) INTEGER
  286.              = 0:  successful exit
  287.              < 0:  if INFO = -i, the i-th argument had an illegal value.
  288.              = 1,...,N:  The QZ iteration failed.  No eigenvectors have been
  289.              calculated, but ALPHAR(j), ALPHAI(j), and BETA(j) should be
  290.              correct for j=INFO+1,...,N.  > N:  =N+1: other than QZ iteration
  291.              failed in DHGEQZ.
  292.              =N+2: error return from DTGEVC.
  293.  
  294. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  295.      Balancing a matrix pair (A,B) includes, first, permuting rows and columns
  296.      to isolate eigenvalues, second, applying diagonal similarity
  297.      transformation to the rows and columns to make the rows and columns as
  298.      close in norm as possible. The computed reciprocal condition numbers
  299.      correspond to the balanced matrix. Permuting rows and columns will not
  300.      change the condition numbers (in exact arithmetic) but diagonal scaling
  301.      will.  For further explanation of balancing, see section 4.11.1.2 of
  302.      LAPACK Users' Guide.
  303.  
  304.      An approximate error bound on the chordal distance between the i-th
  305.      computed generalized eigenvalue w and the corresponding exact eigenvalue
  306.      lambda is
  307.  
  308.           chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
  309.  
  310.      An approximate error bound for the angle between the i-th computed
  311.      eigenvector VL(i) or VR(i) is given by
  312.  
  313.           EPS * norm(ABNRM, BBNRM) / DIF(i).
  314.  
  315.      For further explanation of the reciprocal condition numbers RCONDE and
  316.      RCONDV, see section 4.11 of LAPACK User's Guide.
  317.  
  318.  
  319. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  320.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))                                                          DDDDGGGGGGGGEEEEVVVVXXXX((((3333SSSS))))
  335.  
  336.  
  337.  
  338.      This man page is available only online.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.